package org.lambda.consumer;

import java.util.function.Consumer;

public class ConsumerDemo {

    public static void main(String[] args) {
        /* T：入参类型；没有出参 */
        Consumer<String> consumer = System.out::println;
        consumer.accept("demo");

        Consumer<String> consumer1 = p -> System.out.println("111111");
        consumer.andThen(consumer1).accept("22222");
    }
}
